/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package neo.workforce.servlet;

import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

/**
 *
 * @author KTB_User
 */
public class HelloServlet implements org.springframework.web.HttpRequestHandler {

    public void handleRequest(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
        HttpSession session = req.getSession(false);


        res.setHeader("Cache-Control", "no-cache");
        res.setHeader("Cache-Control", "no-store");
        res.setDateHeader("Expires", 0);
        res.setHeader("Pragma", "no-cache");

        if (session != null) {
            session.invalidate();
        } // end-if

        System.out.println("Hello Servlet Call.");
        PrintWriter out = res.getWriter();
        out.println("<html><body><h1>Hello Servlet</H1></body></html>");
    }
}
